/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package common.Objects;

/**
 *
 * @author Richard Irons
 */
public class Component {
    private int id;
    private String name;
    private String description;
    private int currentStock;
    private double price;
    private int categoryId;

    public Component() {
        this.id = -1;
        this.name = "";
        this.description = "";
        this.currentStock = 0;
        this.price = 0.0;
        this.categoryId = 0;
    }

    @Override
    public String toString() {
        if (id >- 1) {
            return "ID:"
                + this.id
                + ", Name:"
                + this.name;
        } else {
            return "";
        }
    }

    /**
     * Return the components category id
     * @return categoryId
     */
    public int getCategoryId() {
        return categoryId;
    }

    /**
     * Sets the components category id to the input
     * @param categoryId
     */
    public void setCategoryId(int categoryId) {
        this.categoryId = categoryId;
    }
    /**
     * Returns the current stock of the components
     * @return currentStock
     */
    public int getCurrentStock() {
        return currentStock;
    }
    /**
     * Sets the current stock to the input
     * @param currentStock
     */
    public void setCurrentStock(int currentStock) {
        this.currentStock = currentStock;
    }
    /**
     * Returns the description of the component
     * @return descriptions
     */
    public String getDescription() {
        return description;
    }
    /**
     * Sets the description to the input
     * @param description
     */
    public void setDescription(String description) {
        this.description = description;
    }
    /**
     * Returns the components id
     * @return id
     */
    public int getId() {
        return id;
    }
    /**
     * Sets the components id to the input
     * @param id
     */
    public void setId(int id) {
        this.id = id;
    }
    /**
     * Returns the components name
     * @return name
     */
    public String getName() {
        return name;
    }
    /**
     * Sets the components name to the input
     * @param name
     */
    public void setName(String name) {
        this.name = name;
    }
    /**
     * Returns the components price
     * @return price
     */
    public double getPrice() {
        return price;
    }
    /**
     * Sets the components price to the input.
     * @param price
     */
    public void setPrice(double price) {
        this.price = price;
    }
}
